import 'package:flutter/material.dart';
import 'package:flutter_cwhisky/common/style/colors.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';

class CeilingHeaderDelegate extends SliverPersistentHeaderDelegate {
  final Widget child;

  CeilingHeaderDelegate({required this.child});

  @override
  Widget build(BuildContext context, double shrinkOffset, bool overlapsContent) {
    return Container(
      color: AppColors.white,
      child: child,
    );
  }

  @override
  double get maxExtent => 60.r;

  @override
  double get minExtent => 60.r;

  @override
  bool shouldRebuild(covariant SliverPersistentHeaderDelegate oldDelegate) {
    return true;
  }
}